package com.fengke.service;

import java.util.List;
import java.util.Map;

import com.fengke.service.vo.DepartureVO;
import com.fengke.service.vo.DestinationVO;
import com.fengke.service.vo.ProductCategoryVO;
import com.fengke.service.vo.ProductVO;

/**
 * 商品服务
 * 
 * @author BlackFalcon
 *
 */
public interface ProductService {
	/**
	 * 
	 * @param productVO
	 * @param offset -- skip
	 * @param limit -- pageSize
	 * @return
	 * @throws Exception
	 */
	List<ProductVO> researchProductList(ProductVO productVO, int offset, int limit) throws Exception;
	
	/**
	 * 获取结果集大小
	 * @param productVO
	 * @return
	 * @throws Exception
	 */
	Integer researchProductListSize(ProductVO productVO) throws Exception;
	/**
	 * 批量删除数据
	 * 
	 * @param productVO
	 * @param idList
	 * @return
	 * @throws Exception
	 */
	int deleteProductByIds(List<String> idList) throws Exception;
	/**
	 * 插入数据
	 * 
	 * @param productVO
	 * @return Object 
	 *               资源ID
	 * @throws Exception
	 */
	Object createProduct(ProductVO productVO) throws Exception;
	/**
	 * 根据ID检索商品
	 * 
	 * @param productVO
	 * @return
	 * @throws Exception
	 */
	ProductVO researchProductById(ProductVO productVO) throws Exception;
	/**
	 * 根据ID更新商品
	 * 
	 * @param productVO
	 * @return 
	 *        更新条数
	 * @throws Exception
	 */
	int updateProductById(ProductVO productVO) throws Exception;
	/**
	 * 获取商品类型列表
	 * 
	 * @param productCategoryVO
	 * @return
	 * @throws Exception
	 */
	List<ProductCategoryVO> researchProductCategoryList(ProductCategoryVO productCategoryVO, int offset, int limit) throws Exception;

	ProductCategoryVO createProductCategory(ProductCategoryVO productCategoryVO) throws Exception;

	ProductCategoryVO updateProductCategoryById(ProductCategoryVO productCategoryVO) throws Exception;

	void deleteProductCategoryByIds(List<String> list) throws Exception;

	int marketableProductByIds(Map<String, Object> paramMap) throws Exception;

	List<ProductCategoryVO> researchProductCategoryListByOnlineProduct(ProductVO productVO) throws Exception;

	List<DepartureVO> researchDepartureVOListByOnlineProduct(ProductVO productVO) throws Exception;

	List<DestinationVO> researchDestinationVOListByOnlineProduct(ProductVO productVO) throws Exception;

	List<String> researchStartDateListByOnlineProduct(ProductVO productVO) throws Exception;

}
